<?php
/**
 * View AJAX - ASSOCIA CONTATTI A LOCATION LaFabbrica.org
 * 
 * @author     luigi.pastore (gigi@la-fabbrica.org)
 * @created    17-mag-2011
 * @package    LaFabbrica
 * @copyright  Copyright (c) 2011 Luigi Pastore
 */
?>
<tr class="unselectable" id="location_<?php echo $this->location['location_id'] ?>">
    <th>
        <span><?php echo $this->location['location_name'] ?></span>
    </th>
    <td title="<?php echo $this->location['location_city'] ?>">
        <span><?php echo $this->location['location_city'] ?></span>
        <span>(<?php echo $this->location['province_short_name'] ?>)</span>
    </td>
    <td>
        <ul>
            <li class="complex">
                <span class="left">
                    <label>Ruolo:</label>
                    <select class="field select addr" name="locations[<?php echo $this->location['location_id'] ?>][]" id="location_<?php echo $this->location['location_id'] ?>">
                    <?php foreach( $this->contact_roles AS $k => $role ) : ?>
                        <option value="<?php echo $k ?>" <?php echo ( $this->location['fab_contacts_role'] == $k ) ? 'selected="selected"' : ''?>><?php echo  $role ?></option>
                    <?php endforeach; ?>
                    </select>
                </span>
            </li>
        </ul>
    </td>
    <td title="Operazioni">
        <span class="actions">
            <a class="del" id="unlink-location-<?php echo $this->location['location_id']?>" href="#">
                &nbsp;
            </a>
        </span>
    </td>
</tr>
